<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: BurstApplLayer Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00040.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">BurstApplLayer Class Reference<div class="ingroups"><a class="el" href="a00506.html">applLayer - application layer modules</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="BurstApplLayer" --><!-- doxytag: inherits="TestApplLayer" -->
<p>Application layer to test lower layer implementations.  
 <a href="a00040.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00410_source.html">BurstApplLayer.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for BurstApplLayer:</div>
<div class="dyncontent">
<div class="center"><img src="a00624.png" border="0" usemap="#BurstApplLayer_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for BurstApplLayer:</div>
<div class="dyncontent">
<div class="center"><img src="a00625.png" border="0" usemap="#BurstApplLayer_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00626.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae693c2f1fc343d8c253778a1de1c4082"></a><!-- doxytag: member="BurstApplLayer::initialize" ref="ae693c2f1fc343d8c253778a1de1c4082" args="(int)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#ae693c2f1fc343d8c253778a1de1c4082">initialize</a> (int)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize module parameters. <br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3bd389dede2510650cfb8b32d5716b4"></a><!-- doxytag: member="BurstApplLayer::handleSelfMsg" ref="ae3bd389dede2510650cfb8b32d5716b4" args="(cMessage *)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#ae3bd389dede2510650cfb8b32d5716b4">handleSelfMsg</a> (cMessage *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle self messages such as timer... <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#aaaf45ab3db0685c695394ea862a3d79f">handleLowerMsg</a> (cMessage *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle messages from lower layer.  <a href="#aaaf45ab3db0685c695394ea862a3d79f"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5f3f95d8dc606e1003cd4262a091d39e"></a><!-- doxytag: member="BurstApplLayer::burstSize" ref="a5f3f95d8dc606e1003cd4262a091d39e" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#a5f3f95d8dc606e1003cd4262a091d39e">burstSize</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of messages to send in a burst. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf86a6c396e69c375906d2d04cea89a2"></a><!-- doxytag: member="BurstApplLayer::bSendReply" ref="adf86a6c396e69c375906d2d04cea89a2" args="" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00040.html#adf86a6c396e69c375906d2d04cea89a2">bSendReply</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, send a unicast BROADCAST_REPLY message to each received BROADCAST message. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Application layer to test lower layer implementations. </p>
<p>This application layer does exactly the same as the <a class="el" href="a00208.html" title="Test class for the application layer.">TestApplLayer</a>. The only difference is that is sends a burst of broadcast messages instead of just one. The burst size is specified in burstSize and can be set in omnetpp.ini</p>
<dl class="see"><dt><b>See also:</b></dt><dd>TestApplALyer</dd></dl>
<dl class="author"><dt><b>Author:</b></dt><dd>Daniel Willkomm </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="aaaf45ab3db0685c695394ea862a3d79f"></a><!-- doxytag: member="BurstApplLayer::handleLowerMsg" ref="aaaf45ab3db0685c695394ea862a3d79f" args="(cMessage *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void BurstApplLayer::handleLowerMsg </td>
          <td>(</td>
          <td class="paramtype">cMessage *&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Handle messages from lower layer. </p>
<p>There are two kinds of messages that can arrive at this module: The first (kind = BROADCAST_MESSAGE) is a broadcast packet from a neighbor node to which we have to send a reply (if bSendReply is true). The second (kind = BROADCAST_REPLY_MESSAGE) is a reply to a broadcast packet that we have send and just causes some output before it is deleted </p>

<p>Reimplemented from <a class="el" href="a00208.html#af64945ae392b392418574b58b76232b9">TestApplLayer</a>.</p>

<p>Reimplemented in <a class="el" href="a00041.html#a66a2f76f5f30f1920dc65f00a6fd1ac3">BurstApplLayerBattery</a>.</p>

<p>References <a class="el" href="a00040.html#adf86a6c396e69c375906d2d04cea89a2">bSendReply</a>.</p>
<div class="fragment"><pre class="fragment">{
  <span class="keywordflow">if</span> ( !<a class="code" href="a00040.html#adf86a6c396e69c375906d2d04cea89a2" title="If true, send a unicast BROADCAST_REPLY message to each received BROADCAST message.">bSendReply</a> &amp;&amp; msg-&gt;getKind() == BROADCAST_MESSAGE) {
    ApplPkt *m  = <span class="keyword">static_cast&lt;</span>ApplPkt *<span class="keyword">&gt;</span>(msg);
    coreEV &lt;&lt; <span class="stringliteral">&quot;Received a broadcast packet from host[&quot;</span>&lt;&lt;m-&gt;getSrcAddr()&lt;&lt;<span class="stringliteral">&quot;] -&gt; delete message, no reply&quot;</span> &lt;&lt; endl;
    <span class="keyword">delete</span> msg;
    <span class="keywordflow">return</span>;
  }
  <a class="code" href="a00040.html#aaaf45ab3db0685c695394ea862a3d79f" title="Handle messages from lower layer.">TestApplLayer::handleLowerMsg</a>(msg);
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/application/<a class="el" href="a00410_source.html">BurstApplLayer.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/application/BurstApplLayer.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00040.html">BurstApplLayer</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:31 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
